package com.punch.punchtable.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.CookieValue;
import org.springframework.web.bind.annotation.RequestHeader;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;

@Controller
@RequestMapping("")
public class IndexController {

    @RequestMapping("")
    public String index(HttpServletRequest request) {
        HttpSession session = request.getSession();
        String login_username = (String) session.getAttribute("login_username");
        if (login_username == null) {
            return "login";
        }
        return "index";
    }
}
